package com.youju.community.controller;

import com.jiazhong.youju.commons.utils.JSONResult;
import com.youju.community.service.CommunityService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/community")
public class CommunityController {

    @Resource
    private CommunityService communityService;
    @GetMapping("/{id}")
    JSONResult findNameById(@PathVariable int id){
        return communityService.findNameById(id);
    }

}
